﻿//-----------------------------------------------------------------------
// <copyright>
// This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
// </copyright>
//----------------------------------------------------------------------- 
using System.Reflection;
using Fulcrum.DispatcherProxies;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Fulcrum.UnitTests.DispatcherProxies
{
    [DeploymentItem("DispatcherProxies.t4")]
    [DeploymentItem("BaseProxy.cs")]
    [DeploymentItem("DerivedProxy.cs")]
    [DeploymentItem("DispatcherObjectProxy.cs")]
    [DeploymentItem("DoubleDerivedProxy.cs")]
    [DeploymentItem("MyDispatcherClassProxy.cs")]
    [DeploymentItem("MyOtherDispatcherClassProxy.cs")]
    [DeploymentItem("PublicDispatcherObjectDecendantProxy.cs")]
    [TestClass]
    public class DispatcherProxiesGeneratedCodeTests : FulcrumGeneratedCodeTests
    {
        public DispatcherProxiesGeneratedCodeTests()
        {
            // nothing
        }

        [TestMethod]
        public void ValidateDifferentInGeneratedCode()
        {
            ValidateGeneratedCode();
        }

        protected override GenerationUnit CreateGenerationUnit(string path)
        {
            var genUnit = new DispatcherProxyGenerationUnit();
            var settings = (DispatcherProxySettings)genUnit.Settings;

            settings.TargetAssembly = Assembly.GetExecutingAssembly().Location;
            settings.Company = "Fulcrum";
            settings.Copyright = "Fulcrum (R)";
            settings.Namespace = "Fulcrum.GeneratedCode";

            return genUnit;
        }

    }
}
